A position detector for detecting the linear displacement position of a piston rod in a hydraulic cylinder by means of a magnetic scale and sensor is described in, for example, Japanese Tokkai Hei 4-136713 published by the Japanese Patent Office.
In this detector, non-magnetic parts are formed at a fixed interval in an axial direction to act as a magnetic scale on the circumference of a piston rod of magnetic material, and a magnetic sensor which outputs a sine wave according to the passage of the non-magnetic parts is fixed to the cylinder.
If the absolute position at which the displacement of the piston rod starts is not known, its absolute position after displacement cannot be known. A limit switch is therefore provided at the most compressed or most elongated position of the piston rod. When the cylinder is used, i.e. when the power to the position detector is switched on, the piston rod is first brought to Its most compressed or most elongated position so as to switch the limit switch on or off. When the limit switch is switched on or off, the piston rod is detected to have reached a reference point, and the displacement of the piston rod can then be followed until the power is switched off by determining its distance from the reference point from file output signal of the magnetic sensor.
However, if the piston rod is linked to other mechanisms, the whole mechanism assembly has to suffer a large displacement in order to detect the reference point each time the power is switched on.
In Japanese Tokkai 4-71114 published by the Japanese Patent Office, a position detector is described wherein a subscale consisting of a plurality of graduations at unequal intervals is provided on the piston rod parallel to the main scale used to detect the distance through which the rod moves, a second magnetic sensor being fixed to the cylinder to detect the magnetic variation according to the motion of the subscale. In this detector, if two graduations of the subscale pass in front of the second sensor, it can be determined which graduations have passed from the interval between them. Therefore, if these graduations are taken as reference points for the distance measurement on the main scale, they can be used as a reference close to the position at which the piston rod comes to rest, thereby avoiding the trouble of moving the piston rod to the most compressed or elongated position each time the power to the detector is switched on. In this case also, once a reference point has been detected, the displacement of the piston rod can be followed until the power is switched off.
However, as all the graduations on the subscale have to be placed at unequal intervals, there will be some points on the piston where the intervals between graduations is large, and at these points the piston has to be moved through a large distance in order to obtain reference point information.